<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>无标题文档</title>

<style>
div{width:200px;height:300px;border:1px solid #ddd;}
</style>
<script src="../第十三章事件/eventObject.js" type="text/javascript"></script>
</head>

<body>
	<form id="form1" name="form1" action="http://www.baidu.com">
    	<!--通用重置按钮-->
    	<input type="reset" value="reset form"/>
        <input type="text" value="美女"/>
        <!--自定义重置按钮-->
        <!--<button type="reset">submit form</button>-->
        
    </form>
    <script> 
		var form=document.getElementById('form1');
		
		/*var eventInstance=new EventFunction();
		
		eventInstance.addHandler(form, 'reset', function(event){
			
			//阻止表单重置
			//eventInstance.preventDefault(event);
		});*/
		
		//重置表单
		form.reset();
		
		
    </script>
    
</body>
</html>
